﻿using RayDen.Library.Components.Color.Types;
using RayDen.Library.Core;
using RayDen.Library.Core.Primitives;
using RayDen.RayEngine;
using RayDen.RayEngine.Core.Types;
using RayEngine.Spectral.Entities.Materials;

namespace RayEngine.Spectral.Entities.Lighting
{
    public abstract class BaseLight
    {

        protected LightMaterial Material;

        protected BaseLight(LightMaterial mt)
        {
            Material = mt;
        }

        public abstract bool IsDelta();

        public abstract IColorType Emit(ref Vector dir, out float pdf);
        public abstract void EvaluateShadow(ShadePointInfo pt, float u0, float u1, float u2,
                                             out IColorType radiance, out float pdf, out RayData ray);
        public abstract void EvaluateIllumination(RayEngineScene scn, float u0, float u1, float u2, float u3, float u4,
                                                  out RayData ray, out float pdf, out IColorType radiance);
    }
}
